package com;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class test extends HttpServlet {

	public void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		System.out.println("start............");
		String username=request.getParameter("username");
		String content=request.getParameter("content");
		//username=new String(username.getBytes("gb2312"),"utf-8");
		PrintWriter out = response.getWriter();
		out.write(username);
		System.out.println("username>>=="+username);
		out.write(content);
		out.flush();
		out.close();
		System.out.println("end");
	}
}